/**
 * $Revision: 1.2 $
 * $Date: 2007/06/09 12:13:06 $
 *
 * Copyright (C) 1999-2005 Jive Software. All rights reserved.
 * This software is the proprietary information of Jive Software. Use is subject to license terms.
 */

package com.regal.packet;

import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.xmlpull.v1.XmlPullParser;

/**
 *
 */
public class ConferencePush implements PacketExtension {
	/**
     * Element name of the packet extension.
     */
    public static final String ELEMENT_NAME = "query";

    /**
     * Namespace of the packet extension.
     */
    public static final String NAMESPACE = "jabber:message:conference_push";

    private String title;
    private String jid;    
    
    public ConferencePush(String title, String jid) {
    	this.title = title;
    	this.jid = jid;
    }
  
    public String getElementName() {
        return ELEMENT_NAME;
    }

    public String getNamespace() {
        return NAMESPACE;
    }
    
    public String getTitle(){
    	return title;
    }
    
    public String getJid(){
    	return jid;
    }
    
    public String toXML() {
        StringBuffer buf = new StringBuffer();
       
        return buf.toString();
    }
    

    public class Provider implements PacketExtensionProvider
    {

        public Provider()
        {
        }

        public PacketExtension parseExtension(XmlPullParser parser)
            throws Exception
        {   
            String title = parser.getAttributeValue("", "title");
            String jid = parser.getAttributeValue("", "jid");
            
            return new ConferencePush(title,jid);    	
        }
    }    
    
}